using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

/**
*@file       LSPassport_Verify_FailedSender.cs
*@brief      send message LSPassport_Verify_Failed
*
*@author     graywind
*@version    1.0.0.1
*@data       2012/4/14
*/

//send message LSPassport_Verify_Failed
public class msgLSPassport_Verify_Failed
{
    public const int MessageId = (int)LoginServerTypes.MessageType.LSPassport_Verify_Failed;
    //TODO
	public int SessionId = NetLib.INVALID_SESSION;
	public loginserver.PassportVerifyFailed MsgContent = new loginserver.PassportVerifyFailed();
	/// <summary>
	/// Initializes a new instance of the <see cref="msgLSPassport_Verify_Failed"/> class.
	/// </summary>
	/// <param name='session_id'>
	/// Session_id.
	/// </param>
	/// <param name='gate_code'>
	/// Gate_code.
	/// </param>
	public msgLSPassport_Verify_Failed(int session_id, int gate_code)
	{
		SessionId = session_id;
		MsgContent.GateCode = gate_code;
		MsgContent.ErrorCode = gatewayserver.EnterFailed.eErrorCode.Passport_Invalid;
	}
}

//handle message
public partial class gwMessagePort
{
    /// <summary>
    /// handle message
    /// </summary>
    /// <param name="msg">message wrapper of LSPassport_Verify_Failed</param>
    public static void ProcessMessage(msgLSPassport_Verify_Failed msg)
    {
        //TODO
        //Main Message:  msgLoginServer
		msgLoginServer mainMsg = new msgLoginServer(msg.SessionId, msgLSPassport_Verify_Failed.MessageId, ProtoNet<loginserver.PassportVerifyFailed>.IntoBytes(msg.MsgContent));
		gwMessagePort.ProcessMessage(mainMsg);
    }
}
